<?php
/**
 * Created by IntelliJ IDEA.
 * User: FX
 * Date: 2017/12/21
 * Time: 10:59
 */
namespace common\exception;
class Message{
    /** 未登录
     * @message 未登录
     */
    const ERROR_CODE_NOT_LOGIN = 405;

    public static $errors = [
        self::ERROR_CODE_NOT_LOGIN => '当前未登录',
    ];

    public static function get($code,$msg)
    {
        if(isset(self::$errors[$code])){
            return self::$errors[$code];
        }
        return $msg;
    }
}